package com.ppgames.gm.gmsystem.controller;

import com.ppgames.gm.gmsystem.service.ConfigService;
import com.ppgames.gm.gmsystem.util.Resp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author Joeg
 * @email 840459673@qq.com
 * @date 2018/4/19
 */
@RestController
@RequestMapping("/api/config")
public class ConfigController {


    static final String SERVER_CONFIG = "server_config";

    @Autowired
    private ConfigService configService;

    @GetMapping("")
    public Resp getServerConfig() {
        return configService.queryConfig(SERVER_CONFIG);
    }

}
